package cn.swenty.backstage.base.web.system.model;

import java.util.List;
import java.util.Map;

import cn.swenty.backstage.framework.common.tree.TreeNode;

public class Dept implements TreeNode ,Comparable<Dept> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String dept_id;
	private Integer dept_type;
	private String dept_code;
	private String dept_name;
	private String parent_id;
	private String path;
	private Integer dept_state;
	private Integer sequence = 0;
	private List<TreeNode> children;
	private TreeNode parent;


	
	
	public String getDept_id() {
		return dept_id;
	}
	public void setDept_id(String dept_id) {
		this.dept_id = dept_id;
	}
	public Integer getDept_type() {
		return dept_type;
	}
	public void setDept_type(Integer dept_type) {
		this.dept_type = dept_type;
	}
	public String getDept_code() {
		return dept_code;
	}
	public void setDept_code(String dept_code) {
		this.dept_code = dept_code;
	}
	public String getDept_name() {
		return dept_name;
	}
	public void setDept_name(String dept_name) {
		this.dept_name = dept_name;
	}
	public String getParent_id() {
		return parent_id;
	}
	public void setParent_id(String parent_id) {
		this.parent_id = parent_id;
	}
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public Integer getDept_state() {
		return dept_state;
	}
	public void setDept_state(Integer dept_state) {
		this.dept_state = dept_state;
	}
	
	public Integer getSequence() {
		return sequence;
	}
	public void setSequence(Integer sequence) {
		this.sequence = sequence;
	}
	public List<TreeNode> getChildren() {
		return children;
	}
	
	public void setChildren(List children) {
		this.children = children;
	}


	public TreeNode getParent() {
		return parent;
	}
	public void setParent(TreeNode parent) {
		this.parent = parent;
	}
	
	
	public String getId() {
		return dept_id;
	}


	public void setId(String id) {
		this.dept_id = id;
	}
	
	
	
	public Integer getDisplayNo() {
		return sequence;
	}


	public void setDisplayNo(Integer displayNo) {
		
		this.sequence = displayNo;
		
	}

	public Map<String, Object> filter() {
		return null;
	}

	public String getParentId() {
		return parent_id;
	}


	public void setParentId(String parentId) {
		this.parent_id = parentId;
	}
	
	
	@Override
	public String getName() {
		return dept_name;
	}


	@Override
	public String getParentName() {
		return parent.getName();
	}
	@Override
	public int compareTo(Dept o) {
		return this.sequence-o.sequence;
	}



}
